﻿@{
    ViewBag.Title = (Model.Id > 0 ? "修改" : "添加") + "资源";
    Layout = "~/Areas/Admin/Views/Shared/_RightLayout.cshtml";
}
<script src="@Url.Content("~/scripts/ckfinder/ckfinder.js")" type="text/javascript"></script>
<script type="text/javascript">
    function BrowseServer(inputId) {
        var finder = new CKFinder();
        finder.basePath = '/scripts/ckfinder/';
        finder.selectActionFunction = SetFileField;
        finder.selectActionData = inputId;
        finder.startupPath = 'Images:images';
        finder.resourceType = 'Images';
        finder.popup();
    }
    function SetFileField(fileUrl, data) {
        document.getElementById(data["selectActionData"]).value = fileUrl;
    } 
</script>
	<form id="editForm" name="editForm" method="post" action="/Admin/Resource_image/Save/@if(Model.Id > 0){ Write(Model.Id.ToString()); }">
	<div id="panelBar">
		<ul class="toolBar">
			<li><input class="submit" type="submit" value="保存" /></li>
			<li><a class="back" href="javascript:void(0)"><span>返回</span></a></li>
		</ul>
	</div>
	<div id="edit">
		<ul>
            <li> 
				<span class="label">编码：</span>
                <span>@Model.Code</span>
			</li> 
            <li> 
				<span class="label">简体中文：</span>
                <span class="required">
                    <input id="zh_cn" name="zh_cn" type="text" value="@Model.zh_cn" required="required" title="请输入" /> 
                    <input type="button" value=" 浏 览 " onclick="BrowseServer('zh_cn');" />
                </span>
			</li> 
            <li> 
				<span class="label">繁体中文：</span>
                <span class="required">
                    <input id="zh_tw" name="zh_tw" type="text" value="@Model.zh_tw" required="required" title="请输入" /> 
                    <input type="button" value=" 浏 览 " onclick="BrowseServer('zh_tw');" />
                </span>
			</li> 
            <li> 
				<span class="label">英文：</span>
                <span class="required">
                    <input id="en_us" name="en_us" type="text" value="@Model.en_us" required="required" title="请输入" /> 
                    <input type="button" value=" 浏 览 " onclick="BrowseServer('en_us');" />
                </span>
			</li> 
            @*<li> 
				<span class="label">CreateBy：</span>
                <span >
                    <input id="CreateBy" name="CreateBy" type="text" value="@Model.CreateBy"  title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">UpdateBy：</span>
                <span >
                    <input id="UpdateBy" name="UpdateBy" type="text" value="@Model.UpdateBy"  title="请输入" /> 
                </span>
			</li> *@
		</ul>
	</div>
	</form>
